package com.g24.partychecker;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class Feestinfo extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.feestinfo);
        
        Intent i = getIntent();
		Bundle b = i.getExtras();
		String newID = b.getString("FEESTID");
        
        Resources res = getResources(); // Resource object to get Drawables
        TabHost tabHost = getTabHost();  // The activity TabHost
        TabHost.TabSpec spec;  // Resusable TabSpec for each tab
        Intent intent;  // Reusable Intent for each tab
        
        Intent j = new Intent().setClass(this, Info.class);
        j.putExtra("FEESTID", newID);
        j.setClassName("com.g24.partychecker", "com.g24.partychecker.Info");
        spec = tabHost.newTabSpec("info").setIndicator("Info", res.getDrawable(R.drawable.ic_tab_info)).setContent(j);
        tabHost.addTab(spec);
        
        intent = new Intent().setClass(this, Kaart.class);
        spec = tabHost.newTabSpec("kaart").setIndicator("Kaart", res.getDrawable(R.drawable.ic_tab_kaart)).setContent(intent);
        tabHost.addTab(spec);
        
        Intent f = new Intent().setClass(this, Website.class);
        f.putExtra("FEESTID", newID);
        f.setClassName("com.g24.partychecker", "com.g24.partychecker.Website");
        spec = tabHost.newTabSpec("website").setIndicator("Website", res.getDrawable(R.drawable.ic_tab_internet)).setContent(f);
        tabHost.addTab(spec);

        tabHost.setCurrentTab(0);
    }
}